﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace zichan.Models
{
    [Serializable]
    public class oldServerInfo
    {

        //public int AssetId { get; set; }
        [Required(ErrorMessage = "品牌不能为空")]
        public string Brand { get; set; }
        [Required(ErrorMessage = "型号不能为空")]
        public string Version { get; set; }
        [Required(ErrorMessage = "CPU必填")]
        public string CPU { get; set; }
        [Required(ErrorMessage = "内存必填")]
        public string Memory { get; set; }
        [Required(ErrorMessage = "硬盘必填")]
        public string HardDisk { get; set; }
        [Required(ErrorMessage = "RAID卡不能为空")]
        public string HardWareRAID { get; set; }
        [Required(ErrorMessage = "网口必填")]
        public string Comb { get; set; }
        [Required(ErrorMessage = "出厂时间必填")]
        [RegularExpression(@"^(\d{4})/(\d{1}|1[0-2])/(\d{1}|[12]\d{1}|3[01])((\s\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}:([0-5]\d{1}))?$", ErrorMessage = "请输入正确的时间格式，如：2016/1/1")]
        public DateTime DeliveryTime { get; set; }
        [Required(ErrorMessage = "过保时间必填")]
        [RegularExpression(@"^(\d{4})/(\d{1}|1[0-2])/(\d{1}|[12]\d{1}|3[01])((\s\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}:([0-5]\d{1}))?$", ErrorMessage = "请输入正确的时间格式，如：2016/1/1")]
        public DateTime WarrantyTime { get; set; }
        /// <summary>
        ///管理员
        /// </summary>
        public int? AdminiStratorId { get; set; }
       
    }
}